@include('admin.common.header')

<!--tab nav start-->
<script>
  var ue = UE.getEditor('editor', {
        autoHeight: false,
    });

   ue.ready(function() {
       ue.setContent('{!!$introduce->introduce_info!!}');
        $('.form-submitbbb').bind('click', function () {
                var html = ue.getContent();
               var id =$("input[name='id']").val();
                $.ajax({
                    type: 'post',
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    },
                    url: '/admin/introduce/update/edit',
                    data: {introduce_info:html,id:id},
                    dataType: 'json',
                    success: function(){
                        layer.msg('修改成功');
                    }
                });
        });
    });
  /*require(['app/cost'] , function (activity) {
      cost.ajaxAddCost();
  });*/
</script>
<section class="panel">
    <header class="panel-heading tab-bg-dark-navy-blue ">
        <ul class="nav nav-tabs">
            <li @if ($_active['_action'] == 'introduce')  class="active" @endif>
                <a href="/admin/introduce">介绍</a>
            </li>
            <li @if ($_active['_action'] == 'edit')  class="active" @endif>
                <a href="/admin/introduce/edit">修改介绍</a>
            </li>
        </ul>
    </header>
    <div class="panel-body">
        <div class="tab-content">
            <div class="row cmxform form-horizontal tasi-form">
                <div class="col-lg-10">
                    <section class="panel">
                        <div class="panel-body">
                            <div class="form-group ">
                                <label for="name" class="control-label col-lg-2">介绍说明</label>
                                <div class="col-lg-10">
                                <input type="hidden" name="id" value="{{$introduce->id}}"/>
                               <div style="width:1000px;height: 350px;" id="editor" name="introduce_info"></div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
            <div class="col-lg-12 text-center">
                <button class="btn btn-danger form-submitbbb">提交</button>
            </div>
        </div>
      </div>
</section>
<!--tab nav start-->

@include('admin.common.footer')